1. Euler Mathematics — The Engine
Leonhard Euler gave physics its favorite gearbox: the complex exponential.
$$e^{i\theta} = \cos\theta + i\sin\theta = \sum_{n=0}^\infty \frac{(i\theta)^n}{n!}$$Derivation via Taylor series: expand $e^{x}, \cos x, \sin x$ separately — the even powers give cosine, odd powers give $i$ sine. Periodicity $e^{i(\theta+2\pi)}=e^{i\theta}$ is pure topology.
Euler-Lagrange
$$ \frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial \dot q}=0 $$
Extremizes action $S=\int L\,dt$. String worldsheets obey this.
Euler Characteristic
$$ \chi = V-E+F = 2-2g $$
Sphere $g=0\Rightarrow\chi=2$. Torus $g=1\Rightarrow\chi=0$. Controls string loop counting.
Gauss-Bonnet: $\int_M K\,dA = 2\pi\chi(M)$. Curvature integrated knows topology.
Infinite products like $\sin \pi z = \pi z \prod_{n=1}^\infty\left(1-\frac{z^2}{n^2}\right)$ and modular forms $q=e^{2\pi i\tau}$ inherit Euler periodicity — the heart of string partition functions.
Euler Circle Explorer
Drag slider: Euler's formula traces the unit circle, keeping quantum amplitudes normalized.
2. Hilbert Spaces — The Stage
A Hilbert space $\mathcal H$ is a complete vector space with inner product $\langle\cdot|\cdot\rangle$.
For wavefunctions: $$\langle\psi|\phi\rangle = \int_{-\infty}^{\infty}\psi^*(x)\phi(x)\,dx$$ Completeness means every Cauchy sequence converges — no holes for quantum evolution to fall through.
Square-integrable functions
Sequences $\sum|a_n|^2<\infty$
$\bigoplus_{n=0}^\infty \mathcal H^{\otimes_s n}$
Operators $A:\mathcal H\to\mathcal H$ are observables when self-adjoint $A^\dagger=A$. Spectral theorem guarantees real eigenvalues — measurement outcomes.
Hilbert Projection Visualizer
Drag the gold ($|\psi\rangle$) and cyan ($|\phi\rangle$) tips.
Inner product = projection length. Orthogonal vectors give $\langle\psi|\phi\rangle=0$ — the basis of quantum measurement.
3. Quantum Mechanics Bridge
Quantum states are rays in $\mathcal H$: $|\psi\rangle \sim e^{i\alpha}|\psi\rangle$.
Time evolution is Euler's exponential of an anti-Hermitian operator:
$$ |\psi(t)\rangle = e^{-iHt/\hbar}|\psi(0)\rangle = U(t)|\psi(0)\rangle $$$U^\dagger U = I$ because $(-iH)^\dagger = iH$. Unitarity = probability conservation — directly from $e^{i\theta}$ lying on the unit circle.
Measurement: $|\psi\rangle \to \frac{P|\psi\rangle}{\|P\psi\|}$ where $P^2=P=P^\dagger$ projects onto eigenspace. This is Hilbert geometry.
Black Hole factorization (from our Hawking discussion): $$\mathcal H_{\text{total}} = \mathcal H_{\text{in}} \otimes \mathcal H_{\text{out}}$$ Hawking radiation entangles the two factors; unitarity demands the full $S$-matrix acts on $\mathcal H$, not a mixed state.
4. String Theory — Euler Meets Hilbert
Polyakov action for worldsheet $X^\mu(\sigma,\tau)$:
$$ S_P = -\frac{1}{4\pi\alpha'}\int d^2\sigma\,\sqrt{-h}\,h^{ab}\partial_a X^\mu\partial_b X_\mu $$Euler-Lagrange gives wave equation $\partial_+\partial_- X^\mu=0$.
Mode expansion (closed string):
$$ X^\mu = x_0^\mu + \alpha' p^\mu \tau + i\sqrt{\frac{\alpha'}{2}}\sum_{n\neq0}\frac{1}{n}\left(\alpha_n^\mu e^{-in\sigma^+} + \tilde\alpha_n^\mu e^{-in\sigma^-}\right) $$Crucially each mode carries $e^{-in\sigma} = \cos n\sigma - i\sin n\sigma$ — Euler.
Quantize: $[\alpha_m,\alpha_n^\dagger]=m\delta_{m,n}$. The Hilbert space is Fock space built by raising operators $\alpha_{-n}$ acting on vacuum $|0;p\rangle$.
Physical states satisfy Virasoro constraints: $L_n|\psi\rangle=0\;(n>0),\;(L_0-1)|\psi\rangle=0$.
Genus Expansion
$$ \mathcal A \sim \sum_{g\ge0} g_s^{2g-2}\int_{\mathcal M_g} \text{(integrand)} $$
$g_s$ string coupling. Power $2g-2=-\chi$ uses Euler characteristic!
Modular Invariance
$$ Z(\tau)=\mathrm{Tr}\, q^{L_0-c/24}\bar q^{\tilde L_0-c/24},\; q=e^{2\pi i\tau} $$
Invariant under $\tau\to\tau+1$ and $\tau\to-1/\tau$ because $e^{2\pi i}=1$.
String Mode Builder
$X(\sigma)=\sum a_n\cos n\sigma$ — superposition lives in Hilbert space $L^2(S^1)$.
5. M-Theory — Hilbert Space Grows
11D M-theory uplifts strings. BFSS matrix model conjectures:
$$ H = \mathrm{Tr}\left(\frac{P_i^2}{2} - \frac{1}{4}[X^i,X^j]^2 + \text{fermions}\right) $$$X^i$ are $N\times N$ Hermitian matrices. Hilbert space = $L^2(\mathbb R^{9N^2})$ — vastly larger, but still a Hilbert space.
AdS/CFT: $\mathcal H_{\text{CFT on boundary}} \cong \mathcal H_{\text{quantum gravity in bulk}}$. A unitary isomorphism between two Hilbert spaces.
Compactify on Calabi-Yau 3-fold $CY_3$: number of particle generations $\approx |\chi(CY_3)|/2$. Euler characteristic dictates physics.
Dualities (T, S, U) are unitary maps $U:\mathcal H_A \to \mathcal H_B$ preserving inner products — changing basis, not physics.
6. Tying to Hawking and Our Conversations
Hawking Temperature: Wick rotate $t\to i\tau$. Near horizon Euclidean metric smooth iff $\tau\sim\tau+\beta$. Fields satisfy $\Phi(\tau+\beta)=e^{i\omega\beta}\Phi(\tau)=\Phi(\tau)$. Euler periodicity forces $\omega\beta=2\pi n\Rightarrow T_H=1/\beta=\kappa/2\pi$.
Entropy from Hilbert counting: Strominger-Vafa count BPS states in string Fock space: $\dim\mathcal H_{BH}=e^{S}$. Then $S=\log\dim\mathcal H_{BH}=A/4G$. Hilbert dimension = geometry.
Information Paradox: Evolution $U=e^{-iHt}$ is unitary on $\mathcal H_{\text{in}}\otimes\mathcal H_{\text{out}}$. Apparent loss is tracing out interior — a projection, not a breakdown. Completeness of Hilbert space saves unitarity.
Zeno & Time Reversal: Frequent projections $P e^{-iH\Delta t}P\approx P(1-iH\Delta t)$ freeze evolution. $e^{-iHt}$ runs backward under $t\to -t$ because Euler phase conjugates.
7. GNU Octave Laboratory
Copy-paste into Octave to explore the mathematics directly.
a) Hilbert inner product and orthonormal basis
% Create two wavefunctions on [0,2π]
x = linspace(0,2*pi,1000); psi = exp(1i*2*x)/sqrt(2*pi); phi = exp(1i*3*x)/sqrt(2*pi);
ip = trapz(x, conj(psi).*phi); % should be ~0
norm_psi = sqrt(trapz(x, abs(psi).^2));
printf('⟨psi|phi⟩ = %.2e, ||psi|| = %.3f\n', ip, norm_psi);
plot(x, real(psi)); hold on; plot(x, imag(psi));
legend('Re ψ','Im ψ'); title('L^2 orthonormal basis');
Verifies $\langle n|m\rangle=\delta_{nm}$ for Fourier basis — core of Hilbert space.
b) Euler string modes
alpha = 1; sigma = linspace(0,2*pi,500);
X = cos(sigma) + 0.3*cos(2*sigma) + 0.1*cos(3*sigma);
plot(sigma,X,'LineWidth',2); grid on;
title('String shape Σ a_n cos(nσ)'); xlabel('\sigma');
Superposition of Euler exponentials builds classical string shape.
c) Modular partition function (Euler product)
tau = 0.5 + 0.8i; q = exp(2*pi*1i*tau);
eta = q^(1/24) * prod(1 - q.^(1:50)); % Dedekind eta
Z = abs(eta)^(-2);
printf('Z(τ) approx %.4f\n', Z);
Uses Euler's product $\prod(1-q^n)$. Invariant under modular group.
8. Topology & Genus
String amplitudes sum over worldsheets of genus $g$. Euler characteristic $\chi=2-2g$ controls the weight.
g=0 sphere (tree level), g=1 torus (one-loop), higher g = quantum gravity corrections.